package com.example.demotest.demotest.controller;

import com.example.demotest.demotest.vo.UserVo;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.Max;
import javax.validation.constraints.Size;

/**
 * @author x_weidanlang
 * @version 1.0
 * @date 2022/2/9 9:40
 */
@RestController
@RequestMapping("/v1")
@Validated
public class ValidationController1 {
//    @GetMapping("/testValidation3")
//    public String test(@Valid @RequestParam("name") @Size(max = 10,message = "最大为10,最小为5",min = 5) String name,
//                                  @RequestParam("age") @Max(value = 100,message = "最大为100") int age){
//        return name;
//    }
}
